#include <bits/stdc++.h>
using namespace std;

struct node {
	int level;
	vector<int> child;
	node(int l = 0) : level(l) { };
};

vector<node> tree;

void dfs(int root) {
	for (auto it = tree[root].child.begin(); it != tree[root].child.end(); ++it) {
		tree[*it].level = tree[root].level + 1;
		dfs(*it);
	}
}

int main() {
	int n;
	double p, r;
	scanf("%d%lf%lf", &n, &p, &r);
	tree.resize(n);
	for (int i = 0; i < n; ++i) {
		int k;
		scanf("%d", &k);
		tree[i].child.resize(k);
		for (int j = 0; j < k; ++j) {
			scanf("%d", &tree[i].child[j]);
		}
	}

	dfs(0);
	int min = n, cnt = 0;
	for (int i = 0; i < n; ++i) {
		if (!tree[i].child.size()) {
			if (tree[i].level < min) {
				cnt = 1;
				min = tree[i].level;
			}
			else if (tree[i].level == min) {
				cnt++;
			}
		}
	}

	printf("%.4f", p * pow(1 + r * 0.01, min));
	printf(" %d\n", cnt);
	return 0;
}